import { ButtonItemOptions } from "./type";

export class ButtonItem {
  private options: ButtonItemOptions;
  constructor(options: ButtonItemOptions) {
    this.options = options;
  }

  /**设置按钮是否禁用 */
  setButtonDisable(state: boolean) {
    this.options.disabled = state;
  }

  /**设置表单配置项 */
  setOptions(opts: ButtonItemOptions) {
    this.options = opts;
  }

  /**获取按钮配置 */
  getOptions() {
    return this.options;
  }
}
